<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>学生成绩统计</title>
  <script src="./echarts.js"></script>
</head>

<body>
  <div id="main" style="width: 600px; height: 400px"></div>

  <script type="text/javascript">
    // 基于准备好的dom，初始化echarts实例
    var myChart = echarts.init(document.getElementById("main"));
    // 指定图表的配置项和数据
    var option = {
      title: {
        text: "学生成绩统计",
      },
      tooltip: {},
      legend: {
        data: ["成绩"],
      },
      // TODO:待补充修改代码，定义x轴数据,并让数据正确显示
      // y轴
      xAxis: {
        data: ["张三", "李四", "王五", "贺八", "杨七", "陈九"],
      },
      yAxis: {
       
      },
      series: [
        {
          name: "成绩",
          type: "bar",
          data: [55, 90, 65, 70, 80, 63],
        },
      ],
    };

    // 使用刚指定的配置项和数据显示图表。
    myChart.setOption(option);
  </script>
</body>

</html>